package nus.ss.thread.ticket;

public class TestMultiWindowSaleTicket {
    public static void main(String[] args) {

        Ticket ticket = new Ticket(30); // 30 张票

        SaleWindow saleWindow1 = new SaleWindow(ticket,"中北窗口");
        SaleWindow saleWindow2 = new SaleWindow(ticket,"清华窗口");
        SaleWindow saleWindow3 = new SaleWindow(ticket,"北大窗口");

        saleWindow1.start(); //变成Runnable 状态 等待获取CPU的资源
        saleWindow2.start();
        saleWindow3.start();
    }
}
